package com.sunwayhorizo.health.ets.base.persistent;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@TableGenerator(name = "Description_IdGenerator", table = "ET_Id_Generator", pkColumnName = "pkColumn", valueColumnName = "valueColumn", pkColumnValue = "Description_Id")
@NamedQuery(name = "EtDescriptions.findAll", query = "select o from EtDescriptions o")
//@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name = "ET_DESCRIPTIONS")
public class EtDescriptions implements Serializable {
	
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "Description_IdGenerator")
	@Column(name = "DESCRIPTION_ID", nullable = false)
	private String descriptionId;
	
	@Column(name = "TERM_TXT", nullable = false)
	private String termTxt;
	
	@Column(name = "RETIRED_DATE")
	private Timestamp retiredDate;
	
	@Column(name = "STATUS_CODE", nullable = false)
	private String statusCode;
	
	@Column(name = "PREFERRED_FLAG", nullable = false)
	private String preferredFlag;
	
	@Column(name = "EXTENDED_TYPE_CODE")
	private String extendedTypeCode;

	@Column(name = "CREATION_DATE", nullable = false)
	private Timestamp creationDate;
	
	@Column(name = "CREATED_BY", nullable = false)
	private Long createdBy;
	
	@Column(name = "LAST_UPDATE_DATE", nullable = false)
	private Timestamp lastUpdateDate;
	
	@Column(name = "LAST_UPDATED_BY", nullable = false)
	private Long lastUpdatedBy;
	
	@Column(name = "LAST_UPDATE_LOGIN")
	private Long lastUpdateLogin;

	@ManyToOne
	@JoinColumn(name = "VERSION_ID")
	private EtVersions etVersions;
	
	@ManyToOne
	@JoinColumn(name = "CONCEPT_ID")
	private EtConcepts etConcepts;

	public EtDescriptions() {
		Long i = new Long(1);
		Timestamp nowTime = new Timestamp(new Date().getTime());

		createdBy = i;
		creationDate = nowTime;
		lastUpdatedBy = i;
		lastUpdateDate = nowTime;
		lastUpdateLogin = i;
	}

	public Long getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(Long createdBy) {
		this.createdBy = createdBy;
	}

	public Timestamp getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Timestamp creationDate) {
		this.creationDate = creationDate;
	}

	public String getDescriptionId() {
		return descriptionId;
	}

	public void setDescriptionId(String descriptionId) {
		this.descriptionId = descriptionId;
	}

	public String getExtendedTypeCode() {
		return extendedTypeCode;
	}

	public void setExtendedTypeCode(String extendedTypeCode) {
		this.extendedTypeCode = extendedTypeCode;
	}

	public Long getLastUpdatedBy() {
		return lastUpdatedBy;
	}

	public void setLastUpdatedBy(Long lastUpdatedBy) {
		this.lastUpdatedBy = lastUpdatedBy;
	}

	public Timestamp getLastUpdateDate() {
		return lastUpdateDate;
	}

	public void setLastUpdateDate(Timestamp lastUpdateDate) {
		this.lastUpdateDate = lastUpdateDate;
	}

	public Long getLastUpdateLogin() {
		return lastUpdateLogin;
	}

	public void setLastUpdateLogin(Long lastUpdateLogin) {
		this.lastUpdateLogin = lastUpdateLogin;
	}

	public String getPreferredFlag() {
		return preferredFlag;
	}

	public void setPreferredFlag(String preferredFlag) {
		this.preferredFlag = preferredFlag;
	}

	public Timestamp getRetiredDate() {
		return retiredDate;
	}

	public void setRetiredDate(Timestamp retiredDate) {
		this.retiredDate = retiredDate;
	}

	public String getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}

	public String getTermTxt() {
		return termTxt;
	}

	public void setTermTxt(String termTxt) {
		this.termTxt = termTxt;
	}

	public EtVersions getEtVersions() {
		return etVersions;
	}

	public void setEtVersions(EtVersions etVersions) {
		this.etVersions = etVersions;
	}

	public EtConcepts getEtConcepts() {
		return etConcepts;
	}

	public void setEtConcepts(EtConcepts etConcepts) {
		this.etConcepts = etConcepts;
	}
}
